<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require_once ('db_conn.php');


$sql="SELECT * FROM tb_ltcp1";
$lts=$db->query($sql);
$ltlxs=$lts->fetch_all(MYSQLI_BOTH);

 $id=isset($_GET['id'])?$_GET['id']:-1;
    if ($id==-1)
       $sql="select a.*,b.type from tb_ltcp a,tb_ltcp1 b  where a.typeid=b.id ";    
    else
       $sql="select a.*,b.type from tb_ltcp a,tb_ltcp1 b  where a.typeid=b.id and a.typeid=$id";     
    $lt1s=$db->query($sql); //执行语句  $rs是一个结果集
    $ltcps=$lt1s->fetch_all(MYSQLI_BOTH); 
    
    

require 'ProductDisplay.php';


$lt1s->free();


$db->close();
